﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	x:Class="PersianCalendarControl.CalendarItemLabelButton"
	d:DesignWidth="640" d:DesignHeight="480" Width="Auto" Height="Auto">
	<UserControl.Resources>
		<Style x:Key="CalendarItemLabelButton" TargetType="Button">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Button">
					<Grid x:Name="LayoutRoot" Margin="0,0,-2,-2">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualStateGroup.Transitions>
									<VisualTransition GeneratedDuration="0:0:0.2"/>
								</VisualStateGroup.Transitions>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<DoubleAnimation Duration="0" To="0.395" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<ColorAnimation Duration="0" To="#FFFFC92B" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="rectangle" d:IsOptimized="True"/>
										<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="rectangle" d:IsOptimized="True"/>
										<ColorAnimation Duration="0" To="#FFFEFAB2" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="rectangle" d:IsOptimized="True"/>
										<ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="rectangle" d:IsOptimized="True"/>
										<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="rectangle2" d:IsOptimized="True"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed"/>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualStateGroup.Transitions>
									<VisualTransition GeneratedDuration="0:0:0.2"/>
								</VisualStateGroup.Transitions>
								<VisualState x:Name="Unfocused"/>
								<VisualState x:Name="Focused">
									<Storyboard>
										<ColorAnimation Duration="0" To="#FFFCD4A6" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="rectangle1" d:IsOptimized="True"/>
										<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="rectangle1" d:IsOptimized="True"/>
										<ColorAnimation Duration="0" To="#FFFBE49F" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="rectangle1" d:IsOptimized="True"/>
										<ColorAnimation Duration="0" To="#FFFFC92B" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="rectangle1" d:IsOptimized="True"/>
										<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="rectangle2_Copy" d:IsOptimized="True"/>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Rectangle x:Name="rectangle" RadiusY="2" RadiusX="2" Opacity="0" Stroke="Black">
							<Rectangle.Fill>
								<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
									<GradientStop Color="Black" Offset="0"/>
									<GradientStop Color="White" Offset="1"/>
								</LinearGradientBrush>
							</Rectangle.Fill>
						</Rectangle>
						<Rectangle x:Name="rectangle1" RadiusY="2" RadiusX="2" Opacity="0" Stroke="Black">
							<Rectangle.Fill>
								<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
									<GradientStop Color="Black" Offset="0"/>
									<GradientStop Color="White" Offset="1"/>
								</LinearGradientBrush>
							</Rectangle.Fill>
						</Rectangle>
						<Rectangle x:Name="rectangle2" RadiusY="1" RadiusX="1" Stroke="White" Margin="1" Opacity="0"/>
						<Rectangle x:Name="rectangle2_Copy" RadiusY="1" RadiusX="1" Stroke="White" Margin="1" Opacity="0"/>
						<ContentPresenter x:Name="contentPresenter" Margin="4,0,3,0" VerticalAlignment="Center" d:LayoutOverrides="Width" HorizontalAlignment="Center"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
            <Setter Property="FontFamily" Value="/PersianCalendarControl;component/Fonts/Fonts.zip#B Mitra"/>
		<Setter Property="FontSize" Value="14"/>
	</Style>
	</UserControl.Resources>
	<Grid>
	<Rectangle x:Name="rectCurrentSelection" Stroke="#FF690000" RadiusX="2" RadiusY="2" Visibility="Collapsed"/>
    
	<Button x:Name="btnContent" Style="{StaticResource CalendarItemLabelButton}" Click="btnContent_Click" />
	</Grid>
</UserControl>